package com.ssh.entity;

import com.common.entity.BaseEntity;

import javax.persistence.*;
import java.sql.Blob;
import java.util.Date;

/**
 * 文 件 名 称：Mechanic.
 * 文 件 说 明：技工表
 * 创   建   人：zpen.
 * 创 建 时 间：2018/3/21 11:29.
 */
@Entity
@Table(name = "mechanic")
public class Mechanic extends BaseEntity{

    //姓名
    private String name;
    //技工编号
    private String mecNumber;
    //年龄
    private  int age;
//    身份证编号
    private String sfzNo;
//    电话号码
    private String phone;
//    照片
    private Blob photo;
//    地址
    private String address;
//    创建时间
    private Date createTime;
//    状态
    private int state;

    public Mechanic(String name, String mecNumber, int age, String sfzNo, String phone, Blob photo, String address, Date createTime, int state) {
        this.name = name;
        this.mecNumber = mecNumber;
        this.age = age;
        this.sfzNo = sfzNo;
        this.phone = phone;
        this.photo = photo;
        this.address = address;
        this.createTime = createTime;
        this.state = state;
    }

    public Mechanic() {
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "mec_number")
    public String getMecNumber() {
        return mecNumber;
    }

    public void setMecNumber(String mecNumber) {
        this.mecNumber = mecNumber;
    }
    @Column(name = "age")
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    @Column(name = "sfz_no")
    public String getSfzNo() {
        return sfzNo;
    }

    public void setSfzNo(String sfzNo) {
        this.sfzNo = sfzNo;
    }
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    @Column(name = "photo")
    public Blob getPhoto() {
        return photo;
    }

    public void setPhoto(Blob photo) {
        this.photo = photo;
    }

    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Column(name = "state")
    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }
}
